<?php

/**
 * User: Bob
 * Date: 2017/2/14
 * Time: 15:18
 */
namespace AppBundle\Listener;

use OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface;
use PhpAmqpLib\Message\AMQPMessage;

class RabbitListener implements ConsumerInterface
{
    public function execute(AMQPMessage $msg)
    {
        $message = unserialize($msg->body);
        echo json_encode($message);
    }
}